package com.example.messagequeue.mqclient;import lombok.Data;import java.io.IOException;import java.net.Socket;/** * 连接工厂类 */@Datapublic class ConnectionFactory {    private int port;    private String host;    /*    private String virualHostName;    private String username;    private String password;    多虚拟主机所需要的参数     */    public Connection newConnection() throws IOException {        return new Connection(port,host);    }}